Skip to content

Feat/cost attribution 868 - #1104

Merged
Nanle-code merged 5 commits into
Nanle-code:masterfrom
Robinsonchiziterem:feat/cost-attribution-868
Oct 1, 2026
Merged

Nanle-code merged 5 commits into
Nanle-code:masterfrom
Robinsonchiziterem:feat/cost-attribution-868

Conversation

@Robinsonchiziterem

Copy link
Copy Markdown
Contributor

Summary

Implements cost attribution by application tag or memo prefix for project budgeting (#868). Attributes transaction fees (in Stroops and XLM) and payment transfer volumes to developer-defined project tags (e.g. billing, auth, nft-drop, defi-swap) via literal memo prefixes (e.g., [APP:billing], BILL:) or custom regex patterns.

  • Domain Library (src/lib/costThresholdManager.ts): CostThresholdManager implementation for tag management, memo prefix and regex pattern matching, Stroops/XLM fee calculation, volume tracking, threshold alerts (ok, warning >= 80%, exceeded >= 100%, unbudgeted), auto-discovery of embedded tags ([APP:tag]), JSON/CSV report exports, and graceful SSR/storage error handling.
  • Domain Library (src/lib/costThresholdManager.ts): CostThresholdManager implementation for tag definition, memo prefix and regex pattern matching, budget limits, volume tracking, threshold alerts (ok, warning >= 80%, exceeded >= 100%, unbudgeted), auto-discovery of embedded tags ([APP:tag]), JSON/CSV report exports, and graceful SSR/storage error handling.
  • Analytics Integration (src/lib/analytics.ts): Embedded cost attribution calculations into buildAnalyticsSnapshot() and re-exported CostThresholdManager.
  • Documentation: User-facing & developer guide in docs/features/COST_ATTRIBUTION_ANALYTICS.md and changelog entry in CHANGELOG.md.
  • Tests were added or updated for the change (primary flow, a boundary case, and a failure case).
  • Docs were updated where behaviour, configuration, or security posture changed.

Closes #868

@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown

@Robinsonchiziterem is attempting to deploy a commit to the nanle-code's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 28, 2026

Copy link
Copy Markdown

@Robinsonchiziterem Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Manuelshub

Copy link
Copy Markdown
Collaborator

@Robinsonchiziterem Please resolve conflicts.

@Nanle-code
Nanle-code merged commit 682db49 into Nanle-code:master Oct 1, 2026
5 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2026 Analytics] Implement cost attribution by application tag or memo prefix

3 participants